////////////////////////////////////////////////////////////////////////////////
//
//
//  FileName    :   SUISkin_DevExpress.pas
//  Creator     :   Shen Min
//  Date        :   2005-04-21
//  Comment     :   SUISkin for DevExpress QuantumGrid support
//
//  Copyright (c) 2002-2005 Sunisoft
//  http://www.sunisoft.com
//  Email: support@sunisoft.com
//
////////////////////////////////////////////////////////////////////////////////
//
//  How to use:
//      Please add this unit to the "uses" clause of the unit where you
//  also inlcuded SUISkinEngine unit. And add this unit after SUISkinEngine.
//
//  E.g.
//
//  unit test;
//  interface
//  uses ..., SUISkinEngine, SUISkin_DevExpress;
//  ...
//  ...
//
//      Please set SkinAllForms to false for working with DevExpress controls.
//  And you can call AddForm() method of TsuiSkinEngine to skin other forms.

unit SUISkin_DevExpress;

interface

uses Classes,
     cxCheckBox, cxShellComboBox,
     SUISkinEngine, SUISkinUtils;

type
    TsuiSkinCxCheckBox = class(TsuiSkinControlVCL)
    protected
        procedure PaintControl(); override;    
    end;


const
    SUISKIN_DEVEXP_DEF   : array [0 .. 1] of TsuiSkinCtrlVCLDef = (
        (CtrlClass : TcxCustomCheckBox;
         SkinCtrlClass : TsuiSkinCxCheckBox),
        (CtrlClass : TcxCustomShellComboBox;
         SkinCtrlClass : TsuiSkinScrollWinControl)
    );


implementation

procedure RegisterToSUISkinEngine();
begin
    RegisterSkinControlClass(SUISKIN_DEVEXP_DEF);
    
    RegisterBorderFilterClass('TcxControlScrollBar');
    RegisterBorderFilterClass('TcxGridSite');
    RegisterBorderFilterClass('TcxCheckGroup');    
    RegisterBorderFilterClass('TcxRadioGroup');
    RegisterBorderFilterClass('TcxCustomInnerTextEdit');
    RegisterBorderFilterClass('TcxCustomDropDownInnerEdit');
    RegisterBorderFilterClass('TcxCustomComboBoxInnerEdit');
    RegisterBorderFilterClass('TcxPopupCalendar');
    RegisterBorderFilterClass('TcxPopupCalculator');

    RegisterDisabledClass('TdxDockSite');
    RegisterDisabledClass('TdxLayoutDockSite');
    RegisterDisabledClass('TdxDockPanel');

    RegisterDlgFormClass('TfmFilterControlDialog');
    RegisterDlgFormClass('TcxFilterDialog');
    RegisterDlgFormClass('TdxFloatForm');
end;


{ TsuiSkinCxCheckBox }

procedure TsuiSkinCxCheckBox.PaintControl;
begin
    with TcxCheckBox(m_Control) do
    begin
        PaintRadioButtonLikeControl(Checked, Enabled, Style.Color, taRightJustify,
            suiSkinCenter, Width, ClientHeight, m_Engine, self, true, 3);
    end;
end;

initialization
    RegisterToSUISkinEngine();

end.
